<template>
 <div class="home">
    <vueHead :name="name"></vueHead>

    <vueList :dateils="dateils"></vueList>

 </div>
</template>

<script type="text/ecmascript-6">
import vueHead from '../components/headbar'
import vueList from '../components/list'
import api from '../common/api'
export default {
  data () {
    return {
      name: '你赞的',
      dateils: []
    }
  },
  created () {
    this.axios
      .get(api.url + 'user/starred', {
        params: {
          access_token: localStorage.getItem('userToken'),
          sort: 'created',
          direction: 'desc',
          page: 1,
          per_page: 10
        }
      })
      .then(Response => {
        this.dateils = Response.data
      })
      .catch(Error => {
        console.log('数据获取失败' + Error)
      })
  },
  components: {
    vueHead,
    vueList
  }
}
</script>

<style scoped>
.md-tabs {
  margin-top: 2px;
}
</style>
